package raytracer;

import scene.Material;
import scene.Shape;

public class IntersectionResult {
	public Vector3f pos;
	public Material mat;
	public Vector3f normal;
	public float dist;
	public float distSquared;
	public Shape shape;
	public Ray reflectiveRay;
	public Ray refractiveRay;

	public IntersectionResult(Vector3f pos, Vector3f normal, Material mat, float dist, Shape shape) {
		this.pos = pos;
		this.mat = mat;
		this.dist = dist;
		this.distSquared = dist * dist;
		this.normal = normal;
		this.shape = shape;
	}
	
	@Override
	public boolean equals(Object obj) {
		IntersectionResult ir = (IntersectionResult) obj;
		
		
		
		return obj != null && ir.pos.equals(this.pos) && ir.mat.equals(this.mat) && ir.normal.equals(this.normal) && ir.dist == this.dist && ir.shape.equals(this.shape);
	}
}
